<ng-include src="'app/stat/view/filter.html'"></ng-include>

<ul class="nav nav-tabs">
    <li class="active"><a href="javascript:void(0)" data-toggle="tab" data-target="#chart_panel">状态图表</a></li>
    <li><a href="javascript:void(0)" data-toggle="tab" data-target="#list_panel">状态列表</a></li>
</ul>

<div class="tab-content">
    <div class="tab-pane active" id="chart_panel">
        <div id="chart" class="stat_chart"></div>
    </div>
    <div class="tab-pane" id="list_panel">
        <div ng-repeat="(name, data) in list" class="col-sm-6">
            <table class="table table-striped table-bordered table-hover">
                <tr>
                    <th colspan="6">{{ name }}</th>
                </tr>
                <tr>
                    <th>LEADER</th>
                    <th>ACTIVE</th>
                    <th>RECOVERING</th>
                    <th>DOWN</th>
                    <th>RECOVERY_FAILED</th>
                    <th>GONE</th>
                </tr>
                <tr>
                    <td>{{ data[STATUS_LEADER] }}</td>
                    <td>{{ data[STATUS_ACTIVE] }}</td>
                    <td>{{ data[STATUS_RECOVERING] }}</td>
                    <td>{{ data[STATUS_DOWN] }}</td>
                    <td>{{ data[STATUS_RECOVERY_FAILED] }}</td>
                    <td>{{ data[STATUS_GONE] }}</td>
                </tr>
            </table>
        </div>
    </div>
</div>